<template>
  <div>
    <el-container>
      <el-header class="header">XXX大型后台管理系统
        <div>
          <el-button type="danger" @click="del">退出</el-button>
        </div>
      </el-header>
      <el-container>
        <el-aside>
          <v-nav></v-nav>
        </el-aside>
        <el-main><router-view/></el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import vNav from '../components/vNav.vue'
import {useStore} from 'vuex'
import {useRouter} from 'vue-router'
let store = useStore()
let router = useRouter()
let del = ()=>{
  store.dispatch('getUserAction',false)
  router.push('/login')
}
</script>

<style lang="less" scoped>
.header {
  background: pink;
}
.aside{
  height: 400px;
}
</style>